Part Number Hot Search : 
TC962IJA 7824ACT KBL01 KBL01 DLPA006 EG21SR 11110 LTC34
Product Description
Full Text Search
 

To Download AN1953 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  AN1953 rev 2 1/20 20 AN1953 application note pfc for st7mc starter kit introduction the aim of this application note is to give an example of how to use the st7mc microcontroller to implement the power factor correction (pfc) inside a motor control application. the st7mc microcontroller is provided with a motor control peripheral which has been developed to implement motor control function for induction motors and permanent magnet synchronous motors. the motor control peripheral leaves the microcontroller resources free to perform the power factor correction. the power factor correction techni que utilized is called ?t ransition mode?. the hardware used to realize the system is the st7mc starter kit plus an additional external power board called ?add on?. in this application note, theoretical information about the pfc control method is given, in addition to an explanation of the software routine able to manage the pfc stage and the calculation of the add on components. the reader can find extra information about the motor control related routines the application note an1904. http://www.st.com
pfc for st7mc starter kit 2/20 contents 1 theory about the pfc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 starter kit approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 firmware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1 flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 pfc software description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4 hardware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1 power stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1.1 power section design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5 schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7 references and related materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 8 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
pfc for st7mc starter kit 1 theory about the pfc 3/20 1 theory about the pfc this application note focuses on the management by a microcontroller of the boost stage to obtain a power factor corrector (pfc) working in transition mode. of course to do this job the microcontroller should have a timer with a special feature. a block diagram of the application is shown in figure 1 . figure 1. block diagram 1.1 description with this method, the boost inductor works on the boundary between continuous and discontinuous mode. in this operation mode there is a high peak current which means that this kind of approach could be used for power below 600w. here, the system works with fixed on-time and variable frequency and functions as follows: the main supply is rectified by the bridge and the energy is stored in the transformer during the turn-on period of the mosfet. this time interval is called ton and must be calculated by the micro according to the vout value, the input voltage and the load. to simplify the algorithm, just the output voltage is measured and the difference (error) between the desired values (400v) and the actual value is calculated. this error is multiplied by a constant to obtain the right correction value. the measured voltage value is the average of eight adc conversions. the turn-off time of the mosfet is called toff and is fixed by the circuit. this means the inductor discharges all its own energy to the output stage until its current goes to zero. in this condition, the drain voltage will go to the vin voltage and an oscillation due to the mos capacitance is added to this voltage. in order to reduce the commutation losses, the mos must be turned on when the drain voltage reaches the minimum. to detect this condition the secondary winding of the transformer is used. in fact, in this secondary winding is a square wave with zero mean value which is made up of a negative signal during the ton and a positive signal duri ng the toff. to adapt this signal to the digital world of a microcontroller a resistor to limit the current plus the internal clamping diodes have been used to obtain a square ttl waveform. boost stage load driver uc supply st7mc volt measure
1 theory about the pfc pfc for st7mc starter kit 4/20 so, finally, a ttl square wave is obtained on the microcontroller pin which is used by the timer peripheral to restart the counter cycle and fix the counter period. for the timer, it's important to note that if there isn't a load variation and/or a variation of the input voltage, it could work as a standalone circuit without any computational time required to the micro. in fact, if the zero current condition (zcd) is mi ssed the timer will restart at the minimum frequency through a software routine. of course the availability of the micro makes a lot of features possible simply by modifying some parameters and it also allows a particular software routine to be used to improve the control method. the output of the pwm timer is connected to the td220 driver that drives the mos of the boost stage.
pfc for st7mc starter kit 2 starter kit approach 5/20 2 starter kit approach to implement the pfc with the st7mc starter kit we developed a power board ?add on? that realizes the control of the bus voltage with a boost topology. the power add on is connected to the mains and provides the bus voltage for the starter kit. the power add on requires two connections with the starter kit. one is the pwm generated by the microcontroller coming from the starter kit and the second sends the zero crossing signals to the starter kit. the add on power board needs a supplementary 15 volts to supply the driver, which can be provided by the starter kit (j16). the starter kit is then connected to the motor by the wire for the phases and with the tachometer signal if required. the add on power board provides the rectified and controlled voltage bus for the starter kit. the starter kit board has been modified as in figure 2 the bridge d4 has been removed and correctly short-circuited (pin 1-2; pin 3-4) the capacitances c1 and c2 have been removed the ntc1 has been removed and short-circuited the fusible f1 has been removed and short-circuited figure 2. modifications to be performed in the starter kit the modification has been performed also on the value of some component in order to work in safe with a bus voltage of 400-500 volt. so the following components have been substituted: (see figure 3 ) c12 and c13 bulk capacitors have been replaced with one of 470uf 450volt the transil z2 and z3 has been replaced with bzw50 -180 r1 and r2 resistors have been replaced with 68k - 1w c20 capacitor has been replaced with 33nf - 600v ntc1 sg170(4r) 5x20(type kelstone) motor j12 a b 1 2 3 4 5 mstba2,54/5-g-5,08 j3 1 2 3 gmkds 3/3-7,62 90/140vac or 180/260vac tp6 tp13 phase c r43 r44 5.6k 1/4w or 1/4w d16 stta106u r45 1k2 1/4w 1k2 1/4w or 1/4w 5.6k 1/4w r49 r50 r51 r53 r54 d17 stta106u phase b c b a 1 2 3 4 5 6 7 j11 mounted on 17c/w aavid thermalloy heatsink d4 stbr608 motor phases solder for 110vac c1 4.7nf c2 4.7nf y y c11 100nf 400v z4 bzw50-100 w2 12 to solder z2 bzw50-120 bzw50-120 z3 f1 10a 2 1 3 4
2 starter kit approach pfc for st7mc starter kit 6/20 figure 3. modifications to be performed in the starter kit to get the bus voltage value a voltage divider with r16-r17 and r20 is used. to get 5 volts as a maximum voltage for the ad converter with the new bus voltage max value, r20 must be replaced with a 6.2k resistance. to connect the power add on board with the starter kit, use two control cables, one to communicate the pwm for the add on coming from starter kit and one to get the zero crossing from the add on to the starter kit. the connection of the zero crossing cable is critical. the shunt resistor has been connected near the pin of the starter kit to avoid a capacitive parasite effect of the cable acting as a filter for the zero crossing signal and a capacitor of 12pf has been added to filter the noise. to generate the pwm for the pfc, the timer b of the micro is used. the pwm signal of the pfc power add on is connected to the ocmp1_b pin of the micro (j10 pin 3) and the zero crossing signal of the add on reaches the icap1_b pin of the micro (j10 pin 7). the pe2 pin it is connected with icap1_b, because it is used to force the reset of pwm when the zcd signal is missed. this could happen for example when the instantaneous input voltage is too low to energize the inductor. the vout of the add on is the mains for the starter kit board so must be connected to the pin 2 and pin 3 of j3. the ground signal is connected directly from the ground of the micro to the ground of the driver in the add on. the connections are depicted in figure 4 . c11 100nf 400v z4 bzw50-100 c13 1000uf 200v r2 47k 1w r16 470k hv bus r17 470k r20 12k tp11 r1 47k 1w c12 1000uf 200v w2 12 to solder z2 bzw50-120 z3 bzw50-120 phase b tp17 c20 33nf 400v r21 0.047r 4w tp14 7nb60hdfp t5 b60hdfp t4 for 110vac r20 6.2k c20:33nf 600v r1, r2: 68k - 1watt c13, c12: 470uf 450v z2, z3: bzw50- 180 transil
pfc for st7mc starter kit 2 starter kit approach 7/20 figure 4. connection between starter kit and add on power board vout + - pwm zero crossing signal gnd pfc power add on j3 1 2 3 2mm linebar j10 2 1 7 8 1 2 3 4 5 6 7 ocmp1_b/pe1 icap2_b/pe2 icap1_b/pe3 vpp mco0 mco1 signal gnd st7mc starter kit
3 firmware description pfc for st7mc starter kit 8/20 3 firmware description 3.1 flowchart figure 5 shows the flowchart of the art interrupt service routine that is called every 1ms. figure 5. art interrupt service routine for pfc pfc running vout > overvoltage pfc over voltage stop pwm yes yes yes delay20 = 0 pfc ton adjust pfc totonincrease yes pfc running start pwm number of ton increase = 0 counter ton++ counter ton >= maxrestart pfc norestartton stop pwm counter ton = 0 pfc over voltage vout < min_vout yes pfc running restart pwm each 20ms art interrupt every 1ms
pfc for st7mc starter kit 3 firmware description 9/20 figure 6 shows the main loop. figure 6. main flowchart figure 7 shows the pfc_run function. figure 7. pfc_run flowchart pfc_init pfc_timer_init main loop vout = adc_getvout pfc_run motor control routine each loop cycle vout>overvoltage ye s pfc over voltage stop pwm
3 firmware description pfc for st7mc starter kit 10/20 figure 8 shows the pfc_ton_adjust routine. figure 8. pfc_ton_adjust 3.2 pfc software description this paragraph contains a description of the part of the software related to the pfc. the complete explanation of the software is beyond this an. for a more detailed explanation of the motor control software library please refer to the application note an1904. the modules related to pfc are the following: pfc.c pwmart.c (partially) timer.c the file pfc.h contains some parameters that can be customized by the user according the application. at the beginning of the main module (main.c) there is the initialization of the pfc variables and timer parameters. pfc_init(); pfc_timer_init(); setbit(tbcr2,tbcr2_oc1e); then in the main loop the only two tasks performed are the acquisition of the bus voltage vout vout > vout400 pfc running pwm start error = kp * (vout400 - vout) error > 3 no yes yes error = 3 ton = ton + error ton > max_ton yes ton = max_ton number of ton increase++ number of ton increase > maxtonincrease yes pfc totonincrease stop pwm error = kp * (vout - vout400) error > 3 yes error = 3 yes error > ton ton = min_ton ton = ton - error ton < min_ton yes ton = min_ton
pfc for st7mc starter kit 3 firmware description 11/20 vout=adc_getvout(); and the check of over-voltage detection condition, performed in the procedure pfc_run. in the pfc.h file are defined different status of the pfc system: #define pfcoff 0x00 /* no fault*/ #define tootonincrease 0x01 /* too ton increase*/ #define overvoltagefault 0x02 /* overvoltage detect for maxovervoltage time*/ #define pfcrunning 0x04 #define lowvoltagefault 0x10 /* low voltage on dc bus */ #define norestartton 0x20 /* no restart after overvoltage */ #define norestartov 0x40 /* no restart after overvoltage */ #define extbreak 0x80 /* external break event */ the other pfc routines are called inside the art interrupt. this is used as a time base for all time-related issues of the motor control routine and it is generated every 1 ms. the pfc ton adjust routine it is called each 20 art interrupts (20 ms) if the status of the system is pfc running and this routine is used to calculate and set the new ton duration. if the status of the system is tootoni ncrease it means that the pwm is stopped because there was too much successive increase of the ton caused for example by an overload condition. in this case the software tries to restart the pfc clearing the variable ?number of ton increase? and increasing the variable ?counter ton?. if ?counter ton? reaches the maxrestart value the status will be changed in norestartton and the pwm will be stopped. if the status of the system is overvoltage and vout is below min_vout, during the art interrupt the software restarts the pwm. pfc ton adjust this routine is dedicated to the control of the bus voltage by means of the ton duration variable. it is the only pfc-related routine that requires some cpu load. it is executed every 20ms and its duration is 15 microseconds, so the cpu load is 0.075%. the bus voltage is scaled by a factor 0.0065 through a voltage divider. then the a/d conversion introduces another factor of 255/5 so to convert the voltage bus value expressed in volts into the value stored inside the software we can use the formula: rounded down to the nearest integer. so we have the following parameters: #define vbus 140 // = 0.334 * vbus #define min_vout 127 #define over_voltagedc 155 // vbus: is the target bus voltage. over_voltagedc: if the bus voltage exceeds this value the firmware determine an over voltage. in this case it stops the pw m and the pfc_status will be changed in pfcovervoltage. min_vout: if the voltage bus drops under this va lue after an over voltage, the system restarts the pwm generation and the pfc_st atus will be changed in pfcrunning. vout vbus volt [] 0.334 =
3 firmware description pfc for st7mc starter kit 12/20 the error is the difference between the actual value of the voltage bus (vout) and the target voltage (vbus) multiplied by a factor of kp. the error is subtracted from the actual value of the ton. the value of ton is the number of timer b steps. ton is inferiorly limited to min_ton value and superiorly to max_ton. if ton is set to the maximum value the counter ?number of ton increase? is increased by one, if this variable reaches the value maxtonincrease the s ystem pfc status is changed into tootonincrease and the pwm it is stopped. timer.c timer.c module is used to setup and control the generation of the pwm control signal. to generate this signal it is used the timer b peripheral in one pulse mode. the output pin ocmp1_b is used as pwm control signal. the timer b frequency is fixed to 4 mhz so each step is 0.25s. ton duration sets the number of steps in which the ocmp1_b is in high state (see figure 9 ). figure 9. ton time duration of the pwm timb_init (ton) is used to set up the timer b to generate the pulse. ton sets the number of steps of the timer in which the timer output is high. timb_start() is used to start the timer. timb_stop() is used to stop the timer. vector.c timb_interrupt is generated when timer b re aches the value tboc2r = 0x0f9b (after 1 ms the restart of the timer is forced using pe2) this interrupt happens only in the zero current event it is not correctly detected for example when the input voltage it's near the 0v. at each of this interrupt if the ton < min_ton the output of the pwm is switched off this to avoid the a too short pulse it?s generated on the gate of the mos. else if ton >= min_ton the tboc1r is set to (ton - 5) to set the pulse of pwm equal to ton step of timer frequency (4 mhz) ? t=0.25 s ocmp1_b pin timer b block = 4 mhz t ? t=1 s ton=4
pfc for st7mc starter kit 3 firmware description 13/20 figure 10. restarting the pwm if maximum value is reached before the zcd tboc2r tboc1r ton
4 hardware description pfc for st7mc starter kit 14/20 4 hardware description 4.1 power stage the criteria used for the design of the power stage are extracted from the an966 ?l6561, enhanced transition mode power factor corrector?. the steps followed have been to fix the operating conditions and then to dimension the single part of the design to these. mains voltage range: virms(min) virms(max) output voltage: vout output power: pout minimum switching frequency: fsw maximum output voltage ripple: ? vout 4.1.1 power section design input bridge the input diodes bridge can use standard slow recovery, low-cost devices. the quantities to consider will be just the inpu t current (irms), the maximum pea k mains voltage and the thermal data of the diodes. input capacitor the input high frequency filter capacitor (cin) has to attenuate the switching noise due to the high frequency inductor current ripple. high values of cin alleviate the burden to the emi filter but cause the power factor and the harmonic contents of the mains current to worsen, especially at high line and light load. on the other hand, low values of cin improve power factor and reduce mains current distortion but require heavier emi filtering and increase power di ssipation in the input bridge. it is up to the designer to find the right trade-off in their application. output capacitor the output bulk capacitor (co) selection depends on the dc output voltage, the admitted over voltage, the output power and the desired voltage ripple. the 100 to 120hz (twice the mains frequency) voltage ripple ( ? vout= 1/2 ripple peak-to-peak value) is a function of the capacitor impedance and the peak capacitor current. boost inductor designing the boost inductor involves several parameters and different approaches can be used. cout i 0 4 fv out ? ------------- -------- - p out 4 fv out v out ? ----------------- -------------- - =
pfc for st7mc starter kit 4 hardware description 15/20 first, the inductance value must be defined. the inductance (l) is usually determined so that the minimum switching frequency is greater than the minimum switching frequency that avoid audible noise, this value it's fixed by software equal to 10khz to ensure a correct tm operation. assuming unity pf, it is possible to write: so it is possible to calculate the value of the inductor as a function of the minimum switching frequency. powermosfet the choice of the mosfet concerns mainly its r ds , which depends on the output power, since the breakdown voltage is fixed just by the output voltage, plus the over voltage admitted and a safety margin. boost diode the boost freewheeling diode will be of a fast recovery type. design parameters used in this an: input voltage: 176v..264v output regulated voltage: 400v output power: 600w minimum switching frequency: 80khz full load output ripple: 4% input bridge: generic 10a bridge input capacitor: 0.22 f output capacitor 470 f 450v boost inductor 80 h with 29 turns 0.40 mm x 10 in the primary saturation current 10a and 3 turns in the secondary powermosfet p12nk60 boost diode stta12 to calculate all these values you can follow the formulas used in the an966. t on li lpk 2 v irms ------------------- = t off li lpk () sin v out 2 v irms () sin ? ------------------- ----------------- --------------- = l v irms 2 v out 2 v irms ? () 2 f sw p i v out ------------------ ------------------ ---------------- = i rms(max) p out v in(min) ---------------- - 3.4a ==
5 schematics pfc for st7mc starter kit 16/20 5 schematics the add on power stage is depicted in figure 11 . figure 11. schematic of add on power stage gate driver ocp zero current detect vinwaveform vdc+15v vdc+15v j4 con2 1 2 c4 100p + c3 1uf 25 u1 td221 1 2 3 4 5 6 7 8 vin vout nc in gate gnd vsup vcap r5 47 j1 220vac 1 2 3 r7 47 c5 1p j2 vdc-out 1 2 3 r11 68k r2 470k r1 470k r8 12 r3 27k q2 stp12nm50 1 2 3 d4 1n4001 1 3 d3 1n4001 1 3 d5 1n4001 1 3 r64.7 r4 4.7 -+ d1 10a bridge 1 4 2 3 f1 fuse c2 200n 400v t1 transformer 1 3 2 6 j3 d 1 d2 stth106 1 3 ntc1 2.5 1 2 r9 15k c1 1n q1 stp12nm50 1 2 3 r12 0.41 r10 68k
pfc for st7mc starter kit 6 measurement 17/20 6 measurement figures 12 and 13 show the behavior of the pfc in terms of the boost inductor current, the dc bus voltage and the drain voltage. the operating conditions are: vin = 220 v ac load = 440 w figure 12. dc bus drain voltage figure 13. characteristics of drain voltage and inductor current
7 references and related materials pfc for st7mc starter kit 18/20 7 references and related materials 1. st7mc datasheet 2. td22x datasheet 3. an966 l6561, enhanced transition mode power factor corrector 4. an1904 software library for ac induction motor 5. st7 software library, http://www.st.com/mcu
pfc for st7mc starter kit 8 revision history 19/20 8 revision history table 1. document revision history date revision changes 13-may-2005 1 initial release 16-jul-2007 2 removed references to obsolete products
8 revision history pfc for st7mc starter kit 20/20 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by an authorized st representative, st products are not recommended, authorized or warranted for use in milita ry, air craft, space, life saving, or life sustaining applications, nor in products or systems where failure or malfunction may result in personal injury, death, or severe property or environmental damage. st products which are not specified as "automotive grade" may only be used in automotive applications at user?s own risk. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2007 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of AN1953

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X